import service from './request'

// 获取线索列表
export function lineList(data) {
    return service({
        url: "/tienchin/clue/list",
        method: 'get',
        params: data
    })
}
// 获取渠道列表
export function channelsList(data) {
    return service({
        url: "/tienchin/clue/channels",
        method: 'get',
        params: data
    })
}
// 获取渠道活动信息
export function activityInfo(data) {
    return service({
        url: "/tienchin/clue/activity/" + data,
        method: 'get',
        // params: data
    })
}
// 删除线索数据
export function deletelineList(data) {
    return service({
        url: "/tienchin/clue/" + data,
        method: 'delete',
        // data: data
    })
}
// 查看线索数据
export function looklineList(data) {
    return service({
        url: "/tienchin/clue/" + data,
        method: 'get',
        // data: data
    })
}
// 模态框获取数据
export function summaryInfo(data) {
    return service({
        url: "/tienchin/clue/summary/" + data,
        method: 'get',
        // data: data
    })
}
// 模态框获取数据
export function editInfoActive(data) {
    return service({
        url: "/tienchin/clue",
        method: 'put',
        data: data
    })
}
// 保存模态框数据
export function saveInfoActive(data) {
    return service({
        url: "/tienchin/clue",
        method: 'post',
        data: data
    })
}

// 获取商机列表
export function business(data) {
    return service({
        url: "/tienchin/business/list",
        method: "get",
        params: data
    })
}
// 删除商机列表
export function deletebusiness(data) {
    return service({
        url: "/tienchin/business/" + data,
        method: "delete",
        // params: data
    })
}
// 删除商机列表
export function addbusiness(data) {
    return service({
        url: "/tienchin/business",
        method: "post",
        data: data
    })
}
// 说去修改商机信息
export function editbusinessinfo(data) {
    return service({
        url: "/tienchin/business/summary/" + data,
        method: "get",
        // data: data
    })
}
// 删除商机列表
export function putbusinessinfo(data) {
    return service({
        url: "/tienchin/business",
        method: "put",
        data: data
    })
}
// 获取分配信息
export function getbusinessinfo(data) {
    return service({
        url: "/system/dept/treeselect",
        method: "get",
        params: data
    })
}

// 获取渠道来源列表
export function getqdList() {
    return service({
        url: '/tienchin/clue/channels',
        method: "get",
    });
}

// 获取私教课程的课程类型
export function getcourseType() {
    return service({
        url: '/system/dict/data/type/course_type',
        method: "get",
    });
}
// 获取私教课程的用户类型
export function getcourseUser() {
    return service({
        url: '/system/dict/data/type/course_apply_to',
        method: "get",
    });
}

// 获取线索跟进记录
export function getjl(data) {
    return service({
        url: '/tienchin/follow/record/clue/' + data,
        method: "get",
    });
}

// 获取线索跟进
export function getgj(data) {
    return service({
        url: '/tienchin/clue/' + data,
        method: "get",
    });
}
// 获取性别
export function getsex() {
    return service({
        url: '/system/dict/data/type/sys_user_sex',
        method: "get",
    });
}
// 获取无效线索原因
export function getinvalidate() {
    return service({
        url: '/system/dict/data/type/clue_invalidate',
        method: "get",
    });
}
// 获取意向等级
export function getlevel() {
    return service({
        url: '/system/dict/data/type/clue_level',
        method: "get",
    });
}
// 获取意向类型
export function getlx() {
    return service({
        url: '/system/dict/data/type/course_type',
        method: "get",
    });
}

// 获取分配线索
export function getfpxs() {
    return service({
        url: '/system/dept/treeselect',
        method: 'get'
    })
}

// 分配线索分配给用户

export function getfpuser(data) {
    return service({
        url: '/tienchin/clue/users/' + data,
        method: 'get'
    })
}

// 获取分配用户信息
export function getassignment(data) {
    return service({
        url: '/tienchin/assignment',
        method: 'post',
        data: data
    })
}

// 线索提交  follow
export function getfollow(data) {
    return service({
        url: '/tienchin/clue/follow',
        method: 'post',
        data: data
    })
}
// 无效内容提交
export function getinvalid(data) {
    return service({
        url: '/tienchin/clue/invalid',
        method: 'post',
        data: data
    })
}


//转为商机
export function gettobusiness(data) {
    return service({
        url: '/tienchin/clue/to_business/' + data,
        method: 'post',
    })
}

